import * as profileApi from '../../api/profile'

export const getProfile = username => async dispatch => {
  try {
    const { profile } = await profileApi.profile(username)
    dispatch(setProfile(profile))
  } catch (error) {
    
  }
}

export const setProfile = profile => ({
  type: 'setProfile',
  profile
})